#include "alextookit.h"
#include "common/appcfg.h"

AlexToolkit::AlexToolkit(QObject* parent) : QObject(parent) {
    initialize();
}

AlexToolkit::~AlexToolkit() {}

void AlexToolkit::initialize() {
    if(m_initialized) {
        return; // 已经初始化过了
    }
    logger()->info() << "init..";
    m_dbInterface = std::make_shared<DBSqliteInterface>(AppCfg::getInstance().getDatabasePath());

    m_dbInterface->initializeDatabase();

    m_initialized = true;

    logger()->info() << "init done.";
}
